import React, { Component } from 'react'
import { Flex, Button,Form } from 'react-vant'

export default class Mytaps extends Component {
    render() {
        let {data,dataIndex,setIndex}=this.props
        return (
            <div>
                
                <Flex gutter={16} wrap='wrap'>
                {
                    data.map((v,i)=>{
                        return <Flex.Item span={8} key={i}>
                        <Button block type={dataIndex==i?'primary':'default'} onClick={()=>{
                            setIndex(i)
                        }}>{v}</Button>
                    </Flex.Item>
                    })
                }
                </Flex>
            </div>
        )
    }
}
